<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/yw/leaveflow/";  //应用的地址名
String dealActionName = basePath+"OaLeaveDeal_performTask.action";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>请假添加或编辑</title>
<script type="text/javascript">
<!--
           $(function(){
             
               $('#startTime').validatebox({
                   required:'true',
                   missingMessage:'必须开始时间'
                   
               });
               $('#endTime').validatebox({
                   required:'true',
                   missingMessage:'必须结束时间'
                   
               });
               $('#reason').validatebox({
                   required:'true',
                   missingMessage:'必须结束时间',
                   validType:'length[1,200]'
                   
               });
               $('#passAppBtn').remove();
               $('#backAppBtn').remove();
	           //点击添加按钮操作
			   $('#submitAppBtn').click(function(){
                  $('#editForm').submit();
	            });
	            //表单验证及提交处理操作
	           $('#editForm').form({
			        url:'<%=dealActionName%>',
			        onSubmit: function(){
			           if($(this).form('validate')){
			                 $.util.showLoading();
			                 $('#operateWindow').window('close');
                            return true;
			             }else{
			                return false;
			             }
			        },
			        success:function(data){
			            $.util.removeLoading();
                        returnOptMsg(data);
			        }
				});
	            
           });
//-->
</script>
  </head>
  
  <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
    <s:form action="editForm" method="post">
    <s:hidden name="taskId" value="%{#parameters.taskId}"/>
    <input type="hidden" name="po.vcId" value="<s:property value="vcId"/>"/>
	<table align="center" class="tb_add_th" width="100%">
	<tr><th width="35%">开始时间:</th><td><input type="text" id="startTime"  name="po.startTime" value="<s:date name="startTime" format="yyyy-MM-dd HH:mm"/>" class="Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm'})" readonly style="width:130px"/></td></tr>
	<tr><th>结束时间:</th><td><input type="text" id="endTime"  name="po.endTime" value="<s:date name="startTime" format="yyyy-MM-dd HH:mm"/>"  class="Wdate"  onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm'})" readonly style="width:130px"/></td></tr>
	<tr><th>假种:</th>
	<td>
	  <s:select id="leaveType"  name="po.leaveType" list="#{'事假':'事假','病假':'病假'}" style="width:130px"></s:select>
	</td></tr>
	<tr><th>请假事由:</th><td><textarea id="reason" name="po.reason" cols="60" rows="5"><s:property value="reason"/></textarea></td></tr>
    </table>    
   </s:form>
  </body>
</html>

